<template>
	<view>
		<u-sticky offset-top="0">
			<navBarView title="刑事" :statusBarHeight="statusBarHeight"></navBarView>
		</u-sticky>
		<!-- <u-sticky :offset-top="criminalTypeViewTopHeight"> -->
			<view style="width: 750rpx;height: 80rpx;background-color: white;">
				<view class="criminalTypeView flex-row-center">
					<view @click="criminalTypeItemClick(0)" class="criminalTypeItem" style="border-radius: 10rpx 0rpx 0rpx 10rpx;" :style="criminalItemIndex==0?'color: #fff;':'color: #333333;background-color: white;'">
						刑事辩护
					</view>
					<view @click="criminalTypeItemClick(1)" class="criminalTypeItem" :style="criminalItemIndex==1?'color: #fff;':'color: #333333;background-color: white;'">
						刑事自述
					</view>
					<view @click="criminalTypeItemClick(2)" class="criminalTypeItem" style="border-radius: 0rpx 10rpx 10rpx 0rpx;" :style="criminalItemIndex==2?'color: #fff;':'color: #333333;background-color: white;'">
						刑事附民
					</view>
				</view>
			</view>
		<!-- </u-sticky> -->
		
		<!-- 刑事辩护 -->
		<view v-if="criminalItemIndex==0">
			<dangShiRenXinXi :isEdit="false" :infoDic="dangShiRenInfoDic" @dangShiRenInfoCallBack="dangShiRenInfoCallBack"></dangShiRenXinXi>
			<duiFangDangShiRenXinXi :isEdit="false" :infoDic="duiFangDangShiRenInfoDic" @duiFangDangShiRenInfoCallBack="duiFangDangShiRenInfoCallBack"></duiFangDangShiRenXinXi>
			<faDingDaiLiRenXinXi></faDingDaiLiRenXinXi>
			<danWeiXinXi></danWeiXinXi>
			<duiFangDanWeiXinXi></duiFangDanWeiXinXi>
			<anYouJiGuanFeiYong></anYouJiGuanFeiYong>
			<buChongXinXi></buChongXinXi>
			<buChongBiLu></buChongBiLu>
			<buChongHeTong></buChongHeTong>
			<buChongWeiTuoShu></buChongWeiTuoShu>
			<shengChengWenJian @createItemClick="createItemClick"></shengChengWenJian>
		</view>
		
		<!-- 刑事自述 -->
		<!-- <view v-if="criminalItemIndex==1">
			<view class="dsr">
				刑事自述
			</view>
		</view> -->
		
		<!-- 刑事辩护 -->
		<!-- <view v-if="criminalItemIndex==2">
			<view class="dsr">
				刑事附民
			</view>
		</view> -->
		
		<view style="height: 190rpx;"></view>
		<bottomViewTwoButton @leftBtnClick="leftBtnClick" @rightBtnClick="rightBtnClick"></bottomViewTwoButton>
		
		<u-popup :round="10" mode="center" bgColor="transparent" closeOnClickOverlay="true" :show="isShowAlert" @close="goAlertClick">
			<view class="lawyerVipView2">
				<view class="lawyerVipView2DD flex-row-space-between">
					<view class=""></view>
					<image @click="goAlertClick" src="/pageA/static/case_pinkremove.png" style="width: 28rpx;height: 28rpx;margin-right: 24rpx;margin-top: 20rpx"></image>
				</view>
				<view class="flex-row-center">
					<view @click="ziDongShengChengClick" class="itemWidth flex-column-center">
						<image src="/pageA/static/case_zhaoxiang.png" style="width: 60rpx;height: 60rpx;"></image>
						<view class="">
							自动生成
						</view>
					</view>
					<view @click="shouDongShangChuanClick" class="itemWidth flex-column-center">
						<image src="/pageA/static/case_clound.png" style="width: 60rpx;height: 60rpx;"></image>
						<view class="">
							手动上传
						</view>
					</view>
					<view @click="saoMiaoPaiZhaoClick" class="itemWidth flex-column-center">
						<image src="/pageA/static/case_saoyisao.png" style="width: 60rpx;height: 60rpx;"></image>
						<view class="">
							扫描拍照
						</view>
					</view>
				</view>
		    </view> 
		</u-popup>
	</view>
</template>

<script>
	
	
	export default {
		
		onShow() {
			let sysInfo = uni.getSystemInfoSync()
			this.statusBarHeight = sysInfo.statusBarHeight; // 状态栏高度
			this.criminalTypeViewTopHeight = 88+15; // case tyep 距离顶部高度
		},
		data() {
			return {
				statusBarHeight: '',// 状态栏高度
				criminalTypeViewTopHeight:'',
				
				isShowAlert:false,
				
				criminalItemIndex:0,//刑事辩护1  刑事自述2   刑事附民3
				
				
				
				//当事人信息
				dangShiRenInfoDic:{
					name: '老王',
					gender: 0,
					idNumber:'',
					phoneNum:'13388889999',
					frontUrl:'',
					backUrl:''
				},
				//对方当事人信息
				duiFangDangShiRenInfoDic:{
					
				}
				
			}
		},
		onLoad() {
			
		},
		methods: {
			dangShiRenInfoCallBack(dic){
				this.dangShiRenInfoDic = dic
			},
			
			//生成远程函书
			rightBtnClick(){
				uni.navigateTo({
					url:'/pageD/shengChengHanShu/shengChengHanShu'
				})
			},
			//自动生成
			ziDongShengChengClick(){
				this.isShowAlert = false
				uni.navigateTo({
					url:'/pageC/XuanZeHeTongMoBan/XuanZeHeTongMoBan'
				})
			},
			//手动上传
			shouDongShangChuanClick(){
				this.isShowAlert = false
			},
			//扫描拍照
			saoMiaoPaiZhaoClick(){
				this.isShowAlert = false
			},
			createItemClick(item){
				/*['收案审批表','电签委托合同','风险告知书','委托书','接待笔录','空白诉状','空白申请书']*/
				switch (item){
					case '收案审批表':
					{
						
					}
						break;
					case '电签委托合同':
					{
						this.isShowAlert = true
					}
						break;
					case '风险告知书':
					{
						
					}
						break;
					case '委托书':
					{
						
					}
						break;
					case '接待笔录':
					{
						
					}
						break;
					case '空白诉状':
					{
						
					}
						break;
					case '空白申请书':
					{
						
					}
						break;
					default:
						break;
				}
			},
			goAlertClick(){
				this.isShowAlert = false
			},
			criminalTypeItemClick(index){
				this.criminalItemIndex = index
			}
		}
	}
</script>

<style>
	.itemWidth{
		width: 213rpx;
	}
	.lawyerVipView2DD{
		width: 640rpx;
	}
	.lawyerVipView2{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 18rpx;
		width: 640rpx;
		height: 200rpx;
		background: linear-gradient( 180deg, #FFE7E9 0%, #FFFFFF 100%);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.saveButton{
		width: 342rpx;
		height: 90rpx;
		border: 2rpx solid #E93548;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #E93548;
		line-height: 90rpx;
		text-align: center;
	}
	.loginButton {
		margin-left: 18rpx;
		width: 342rpx;
		height: 90rpx;
		background: linear-gradient( to bottom, #E93548 0%, #F35B43 100%);
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(235,43,59,0.4);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #FFFFFF;
		line-height: 90rpx;
		text-align: center;
	}
	.createItem{
		margin-left: 20rpx;
		margin-top: 20rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;
		height: 80rpx;
		border-radius: 10rpx;
		border: 3rpx solid rgba(233, 53, 72, 1);
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #EB2B3B;
		line-height: 80rpx;
		text-align: center;
	}
	.createView{
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-content: space-between;
		margin-left: 2rpx;
		margin-top: 20rpx;
	}
	::v-deep.u-textarea {
		margin-left: 24rpx;
		width: 666rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.frontbackIcon{
		width: 336rpx;
		height: 200rpx;
	}
	.frontbackText{
		margin-top: 18rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
	}
	.sexIcon{
		width: 36rpx;
		height: 36rpx;
		background-color: #E93548;
	}
	.sexText{
		margin-left: 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
	}
	.inputView{
		width: 440rpx;
		margin-left: 12rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
		text-align: right;
	}
	.inputView2{
		width: 160rpx;
		margin-left: 88rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
		text-align: left;
	}
	.inputView3{
		width: 200rpx;
		margin-left: 88rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
		text-align: right;
	}
	.inputView4{
		width: 456rpx;
		margin-left: 88rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
		text-align: left;
	}
	.name{
		width: 250rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
	}
	.name2{
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
	}
	.name3{
		width: 180rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 30rpx;
		color: #333333;
	}
	.contentView{
		padding-left: 24rpx;
		padding-right: 24rpx;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
	}
	.contentView2{
		padding-left: 24rpx;
		padding-right: 24rpx;
		padding-top: 10rpx;
		padding-bottom: 20rpx;
	}
	.dsr{
		margin-left: 24rpx;
		margin-top: 40rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
	}
	.criminalTypeItem{
		margin-left: 1rpx;
		width: 232rpx;
		height: 74rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 30rpx;
		line-height: 74rpx;
		text-align: center;
	}
	.criminalTypeView{
		margin-top: 30rpx;
		margin-left: 24rpx;
		width: 702rpx;
		height: 80rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		background: linear-gradient( to bottom, #E93548 0%, #F35B43 100%);
	}

</style>
